import { UserVO } from '../../users/vo/user.vo';
import { ApiProperty } from '@nestjs/swagger';
import { copyMatchingProperties } from '../../../common/utils/objectCopy';

export class LoginVO {
  @ApiProperty({
    description: '登录令牌',
    example: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...',
  })
  token: string;

  @ApiProperty({ description: '用户信息', type: UserVO })
  user: UserVO;

  constructor(partial: Partial<LoginVO>) {
    copyMatchingProperties(this, partial);
  }
}
